<?php

use think\migration\Seeder;

class BasicIndustryData extends Seeder
{
    /**
     * 行业数据
     * 一个公司属于一个行业
     */
    public function run()
    {
        $table = $this->table('basic_industry');
        $rows  = [
            //7个工业
            [
                'id'           => 1,
                'name'         => '电力',
                'english_name' => 'heating',
                'pinyin_name'  => 'dianligongre',
                'type'         => '1',
                'type_detail'  => '工业',
            ],
            [
                'id'           => 2,
                'name'         => '焦化',
                'english_name' => 'coking',
                'pinyin_name'  => 'jiaohua',
                'type'         => '1',
                'type_detail'  => '工业',
            ],
            [
                'id'           => 3,
                'name'         => '钢铁',
                'english_name' => 'iron',
                'pinyin_name'  => 'gangtie',
                'type'         => '1',
                'type_detail'  => '工业',
            ],
            //4，注：董总于2019-04-16说是这两个为一个行业
            //4，注：董总于2019-05-06又说这必须分为两个行业
            //4，注：董总于2019-06-05又说这必须分为一个行业
            [
                'id'           => 4,
                'name'         => '水泥玻璃',
                'english_name' => 'cement_glass',
                'pinyin_name'  => 'shuiniboli',
                'type'         => '1',
                'type_detail'  => '工业',
            ],
            [
                'id'           => 6,
                'name'         => '锅炉',
                'english_name' => 'boiler',
                'pinyin_name'  => 'guolu',
                'type'         => '1',
                'type_detail'  => '工业'
            ],
            [
                'id'           => 7,
                'name'         => '石油化工',
                'english_name' => 'chemical_industry',
                'pinyin_name'  => 'shiyouhuagong',
                'type'         => '1',
                'type_detail'  => '工业',
            ],
            [
                'id'           => 8,
                'name'         => '其他工业',
                'english_name' => 'other_industry',
                'pinyin_name'  => 'qitagongye',
                'type'         => '1',
                'type_detail'  => '工业',
            ],
            //3个非工业
            [
                'id'           => 9,
                'name'         => '居民',
                'english_name' => 'resident',
                'pinyin_name'  => 'juming',
                'type'         => '2',
                'type_detail'  => '非工业',
            ],
            [
                'id'           => 10,
                'name'         => '运输',
                'english_name' => 'transportation',
                'pinyin_name'  => 'yunshu',
                'type'         => '2',
                'type_detail'  => '非工业',
            ],
            [
                'id'           => 11,
                'name'         => '其他非工业',
                'english_name' => 'other',
                'pinyin_name'  => 'qitafeigongye',
                'type'         => '2',
                'type_detail'  => '非工业',
            ],
        ];
        $table->insert($rows)->save();
    }
}